extends layout.pug

block content
  div.row
    div.col-sm-8
      each article in articles
        article.article-body(style="margin-bottom: 2em;")
          header
            h1(style="margin-bottom: 4px;")
              a.article-title(href="/article/"+article._id)= article.title
          div.article-meta(style="margin-bottom: 0px;")
            if (article.top)
              span.text-danger
                i.fa.fa-angellist
                = " 已置顶(^.^)"
            time.article-datetime
              i.fa.fa-calendar(aria-hidden="true")
              = " " + article.time
            div.pull-right
              if (login)
                span.article-delete(data-del=JSON.stringify({title: article.title, id: article._id}))
                  i.fa.fa-close(aria-hidden="true")
                  = " 删除"
                a.article-update(href="/admin?update=" + article.id)
                  i.fa.fa-pencil(aria-hidden="true")
                  = " 编辑"

    div.col-sm-3.col-sm-offset-1
      include template/sidebar.pug
